# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=perl-text-csv
_dist=Text-CSV
pkgver=2.03
pkgrel=1
pkgdesc="comma-separated values manipulator"
url="https://metacpan.org/dist/$_dist"
arch=(any)
license=(
  GPL
  PerlArtistic
)
options=(!emptydirs)
depends=(perl)
source=("https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/$_dist-$pkgver.tar.gz")
b2sums=('d40f31623d4b946395968e834cb98b922d75d9515a0d416a3680efd3d739bbd2b429c266132217671fd9f4c27ad6367439d2b11fa60664e2d8b15e58429d80bb')

unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT

build() {
    cd $_dist-$pkgver
    export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
    perl Makefile.PL
    make
}

check() {
    cd $_dist-$pkgver
    export PERL_MM_USE_DEFAULT=1
    make test
}

package() {
    cd $_dist-$pkgver
    make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
}

# vim:set sw=2 sts=-1 et:
